package com.cskaoyan.com.collection.vector_stack;

import java.util.Deque;
import java.util.LinkedList;
import java.util.Stack;
import java.util.Vector;

public class DemoVector {
    public static void main(String[] args) {

        Vector<String> vector = new Vector<>();
        vector.add("zs");

        Stack<String> stack = new Stack<>();
        stack.push("zs");
        stack.pop();
        stack.peek();


        // 不要这样写?
//        stack.add("zs");
//        stack.add(1, "zs");


        Deque<String>  stack2 = new LinkedList<>();
        stack2.push("zs");
        stack2.pop();
        stack2.peek();

    }
}
